namespace MsForgeReboot.Services.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class CriesAndCriesStatistics : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.Cries",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        Title = c.String(),
                        FullText = c.String(),
                        StartDate = c.DateTime(),
                        EndDate = c.DateTime(),
                        Address = c.String(),
                    })
                .PrimaryKey(t => t.Id);
            
            CreateTable(
                "dbo.CryStatistics",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        Channel = c.String(),
                        Delivered = c.Boolean(nullable: false),
                        DateDelivered = c.DateTime(nullable: false),
                        DeliveryStatus = c.Int(nullable: false),
                        Cry_Id = c.Int(),
                    })
                .PrimaryKey(t => t.Id)
                .ForeignKey("dbo.Cries", t => t.Cry_Id)
                .Index(t => t.Cry_Id);
            
        }
        
        public override void Down()
        {
            DropIndex("dbo.CryStatistics", new[] { "Cry_Id" });
            DropForeignKey("dbo.CryStatistics", "Cry_Id", "dbo.Cries");
            DropTable("dbo.CryStatistics");
            DropTable("dbo.Cries");
        }
    }
}
